package hr.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.github.xiaoymin.knife4j.annotations.Ignore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 * 员工信息表
 * </p>
 *
 * @author zzh
 * @since 2023-12-04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Employees对象", description = "员工信息表")
public class Employee implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("员工ID")
    @TableId(value = "employee_id", type = IdType.AUTO)
    private Long employeeId;

    @TableField(exist = false)
    private String name;

    @ApiModelProperty("入职表单填写的id")
    private Long onboardingFormId;

    @ApiModelProperty("员工状态")
    private Integer employeeState;

    @ApiModelProperty("员工类型")
    private Integer employeeType;

    @ApiModelProperty("工资")
    private Double salary;

    @ApiModelProperty("入职日期")
    private Long joinDate;



    @ApiModelProperty("头像")
    private String avatar;

    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer isDeleted;

    public String getAvatar() {
        return "liujijiself.f3.ttkt.cc:80/avatar/" + avatar;
    }
}
